home *** CD-ROM | disk | FTP | other *** search
Wrap
-- Button Pushbutton -- behavior library version 1.1 -- a control property UpCM, DownCM, UpNum, DownNum property button_active on mouseDown me set the member of sprite (the spriteNum of me) = member the downCM of me set the button_active of me = TRUE end on mouseUp me set the member of sprite (the spriteNum of me) = member the UpCM of me set the button_active of me = false end on mouseEnter me if the button_active of me then set the member of sprite (the spriteNum of me) = member the DownCM of me end if end on mouseLeave me if the button_active of me then set the member of sprite (the spriteNum of me) = member the UpCM of me end if end on mouseUpOutside me -- mouse leave will set the picture to up set the button_active of me = false end --- on beginSprite me set the UpCM of me = the member of sprite (the spriteNum of me) set the UpNum of me = the number of member UpCM set the DownNum of me = the number of member DownCM set the button_active of me = false -- puppetSprite the spriteNum of me, TRUE end on endSprite me -- puppetSprite the spriteNum of me, FALSE end on getPropertyDescriptionList if the currentspritenum = 0 then set memdefault = 0 else set memref = the member of sprite the currentspritenum set castlibnum = the castlibnum of memref set memdefault = member (the membernum of member memref + 1) of castlib castlibnum end if set p_list = [ #DownCM: [ #comment: "Hilite Image:", #format: #graphic, #default: memdefault ] ] return p_list end on getBehaviorDescription return "Makes a sprite work as a pushbutton with automatic highlighting and mouse tracking. The sprite's initial castmember represents the button's normal state." & RETURN & "PARAMETERS:" & RETURN & "ï Hilite Image - Choose the cast member to display when the button is pressed. The default value is the cast member immedietly following the sprite's current cast member." end